-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
citizen logout redirection handled in multiroot tenant #1633
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request modify the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range comments (1)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/StaticCitizenSideBar.js (1)
Line range hint
134-138
: Remove commented outredirectToLoginPage
function.This function appears to be unused and contains commented out code. Since the redirection logic is now handled in
handleOnSubmit
, this function is redundant.Consider removing this unused function:
- const redirectToLoginPage = () => { - // localStorage.clear(); - // sessionStorage.clear(); - history.push(`/${window?.contextPath}/citizen/login`); - };
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/StaticCitizenSideBar.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/StaticCitizenSideBar.js (1)
Pattern
**/*.js
: check
🔇 Additional comments (1)
micro-ui/web/micro-ui-internals/packages/modules/core/src/components/TopBarSideBar/SideBar/StaticCitizenSideBar.js (1)
97-106
: Verify the impact of multiroot tenant check.The new conditional logic for multiroot tenants affects the logout flow. Let's verify if this change is consistently handled across the application.
✅ Verification successful
Based on the search results, I can now generate the final response since I have enough information about how
getMultiRootTenant()
is used across the codebase and the logout implementation patterns.The multiroot tenant logout handling is correctly implemented
The search results show that:
- The logout implementation with multiroot tenant check is unique to this location and appropriately handles the redirection
- Other uses of
getMultiRootTenant()
across the codebase are primarily for:
- Tenant/state ID selection
- UI component visibility control
- Form field behavior
- Data fetching configurations
The conditional logic for multiroot tenant logout is specific to the authentication flow and doesn't need to be replicated elsewhere since:
- This is the main logout handler in the application
- Other instances of
window.location.href
with login are for different purposes (checking current URL)- The logout flow naturally belongs in the sidebar component where it's implemented
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for other logout implementations that might need similar multiroot tenant handling rg -l "Digit\.UserService\.logout" | xargs rg "window\.location\.href.*login" # Search for other uses of getMultiRootTenant to ensure consistent behavior rg "getMultiRootTenant"Length of output: 12079
citizen logout redirection handled in multiroot tenant
Summary by CodeRabbit
New Features
Bug Fixes